<h1><%=h @project.name %></h1>

<div class="float_container">
  <div class="floater" id="project_actions">
    <h2>Actions</h2>
    <ul>
      <li><%= link_to 'Submit an Issue', url_for( :controller => :issues, :action => :new, :project_id => @project.name ) %>
      <li><%= link_to "View Open Issues (#{@latest.size})", url_for( :controller => :issues, :project_id => @project.name ) %>
      <li><%= link_to "View All Issues (#{@project.issues.size})", url_for( :controller => :issues, :action => :all, :project_id => @project.name ) %>
      <li><%= link_to 'Browse Forum', '#' %></li>
      <% if @current_user and @project.member? @current_user -%>
      <li><%= link_to 'Edit Project Details', edit_project_url( @project.name ) %></li>
      <% else -%>
      <li><%= link_to 'Join This Project', '#' %></li>
      <% end -%>
    </ul>
  </div>

  <div class="floater" id="project_info">
    <h2>Project Details</h2>
    <dl>
      <dt>Members:</dt>
      <dd>&nbsp;
        <%= @project.members.map { |m|
              link_to h(m.display), user_path( m )
          }.join( '<br />' ) %>
      </dd>
    </dl>
  </div>
</div>

<div class="info">
  <dl class="project_info">
    <dt class="name">Name</dt>
    <dd class="name"><%=h @project.name %></dd>
    <dt class="type">Type (not for user)</dt>
    <dd class="type"><%=h @project.type %></dd>
    <dt class="description">Description</dt>
    <dd class="description"><%= wiki white_list(@project.description) %></dd>
  </dl>
</div>

<div class="issue_summaries" id="new">
  <h3>Latest Issues</h3>
  <% @latest.reverse.each do |issue| -%>
    <%= render :partial => 'shared/issue_summary', :locals => { :project => @project, :issue => issue } %>
  <% end -%>
</div>

<div class="issue_summaries" id="recent">
  <h3>Recently Updated</h3>
  <% @recent.reverse.each do |issue| -%>
    <%= render :partial => 'shared/issue_summary', :locals => { :project => @project, :issue => issue } %>
  <% end -%>
</div>
